package com.example.demo.common.mapper;

import java.util.List;
import java.util.Map;

import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import com.baomidou.mybatisplus.mapper.BaseMapper;
import com.baomidou.mybatisplus.plugins.Page;
import com.example.demo.common.entity.User;

@Mapper
public interface UserMapper  extends BaseMapper<User> {
   @Select("select * from user")
   public List<User> selectAll();
   
   @Select("${sql}")
   public List<User> selectBySql(@Param("sql") String sql);
   
   @Select("select * from user where 1=1 ${sql}")
   public List<User> selectBySeachParam(@Param("sql") String sql,@Param("searchParam") Map<String, Object> searchParam,Page<User> page); 
   
   @Select("select * from user where 1=1 ${sql}")
   public List<User> selectBySeachParam(@Param("sql") String sql,@Param("searchParam") Map<String, Object> searchParam); 
}